<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动元素的破坏性</title>
    <style type="text/css">
        .top_bar{
            border: 1px solid red;
        }
        .child1{
            width: 200px;
            height: 200px;
            background-color: lightgreen;
            float: left;
        }
        .child2{
            width: 200px;
            height: 200px;
            background-color: lightcoral;
            float:right;
        }
        .header{
            width: 100%;
            height: 100px;
            background-color: purple;
        }
    </style>
</head>
<body>
    <div class="top_bar">
        <div class="child1">
            大儿子
        </div>
        <div class="child2">
            二儿子
        </div>
    </div>
    <div class="header">

    </div>
</body>
</html>